/////////////////////////////////////////////////////////////////////
//
// Opos.h
//
//   General header file for OPOS Applications.
//
// Modification history
// ------------------------------------------------------------------
// 1995-12-08 OPOS Release 1.0                                   CRM
// 1997-06-04 OPOS Release 1.2                                   CRM
//   Add OPOS_FOREVER.
//   Add BinaryConversion constants.
// 1998-03-06 OPOS Release 1.3                                   CRM
//   Add CapPowerReporting, PowerState, and PowerNotify constants.
//   Add power reporting constants for StatusUpdateEvent.
// 2000-09-24 OPOS Release 1.5                                   CRM
//   Add OpenResult status constants.
// 2004-10-26 OPOS Release 1.8                                   CRM
//   Add "ResultCodeExtended" statistics constant.
// 2005-04-29 OPOS Release 1.9                                   CRM
//   Add CompareFirmwareVersion's Result constants.
//   Add StatusUpdateEvent and ResultCodeExtended constants
//     for firmware update.
// 2006-03-15 OPOS Release 1.10                                  CRM
//   Add another constant for firmware update.
// 2007-01-30 OPOS Release 1.11                                  CRM
//   Add ResultCode constant for deprecation.
// 2008-08-30 OPOS Release 1.12                                  CRM
//   Comment updates.
// 2011-04-07                                                    EPO
//   Converted to Pascal by Eric Orilla
//
/////////////////////////////////////////////////////////////////////

unit opos;

interface

const
/////////////////////////////////////////////////////////////////////
// OPOS "State" Property Constants
/////////////////////////////////////////////////////////////////////

  OPOS_S_CLOSED        : Longint     = 1;
  OPOS_S_IDLE          : Longint     = 2;
  OPOS_S_BUSY          : Longint     = 3;
  OPOS_S_ERROR         : Longint     = 4;


/////////////////////////////////////////////////////////////////////
// OPOS "ResultCode" Property Constants
/////////////////////////////////////////////////////////////////////

  OPOS_SUCCESS         : Longint     =   0;
  OPOS_E_CLOSED        : Longint     = 101;
  OPOS_E_CLAIMED       : Longint     = 102;
  OPOS_E_NOTCLAIMED    : Longint     = 103;
  OPOS_E_NOSERVICE     : Longint     = 104;
  OPOS_E_DISABLED      : Longint     = 105;
  OPOS_E_ILLEGAL       : Longint     = 106;
  OPOS_E_NOHARDWARE    : Longint     = 107;
  OPOS_E_OFFLINE       : Longint     = 108;
  OPOS_E_NOEXIST       : Longint     = 109;
  OPOS_E_EXISTS        : Longint     = 110;
  OPOS_E_FAILURE       : Longint     = 111;
  OPOS_E_TIMEOUT       : Longint     = 112;
  OPOS_E_BUSY          : Longint     = 113;
  OPOS_E_EXTENDED      : Longint     = 114;
  OPOS_E_DEPRECATED    : Longint     = 115; // (added in 1.11)

  OPOSERR    : Longint     = 100; // Base for ResultCode errors.
  OPOSERREXT : Longint     = 200; // Base for ResultCodeExtendedErrors.


/////////////////////////////////////////////////////////////////////
// OPOS "ResultCodeExtended" Property Constants
/////////////////////////////////////////////////////////////////////

// The following applies to ResetStatistics and UpdateStatistics.
  OPOS_ESTATS_ERROR       : Longint     = 280; // (added in 1.8)
  OPOS_ESTATS_DEPENDENCY  : Longint     = 282; // (added in 1.10)
// The following applies to CompareFirmwareVersion and UpdateFirmware.
  OPOS_EFIRMWARE_BAD_FILE : Longint     = 281; // (added in 1.9)


/////////////////////////////////////////////////////////////////////
// OPOS "OpenResult" Property Constants (added in 1.5)
/////////////////////////////////////////////////////////////////////

// The following can be set by the control object.
//  - Control Object already open.
  OPOS_OR_ALREADYOPEN  : Longint     = 301;
//  - The registry does not contain a key for the specified device name.
  OPOS_OR_REGBADNAME   : Longint     = 302;
//  - Could not read the device name key's default value, or
//     could not convert this Prog ID to a valid Class ID.
  OPOS_OR_REGPROGID    : Longint     = 303;
//  - Could not create a service object instance, or
//     could not get its IDispatch interface.
  OPOS_OR_CREATE       : Longint     = 304;
//  - The service object does not support one or more of the
//     method required by its release.
  OPOS_OR_BADIF        : Longint     = 305;
//  - The service object returned a failure status from its
//     open call, but doesn't have a more specific failure code.
  OPOS_OR_FAILEDOPEN   : Longint     = 306;
//  - The service object major version number is not 1.
  OPOS_OR_BADVERSION   : Longint     = 307;

// The following can be returned by the service object if it
// returns a failure status from its open call.
//  - Port access required at open, but configured port
//     is invalid or inaccessible.
  OPOS_ORS_NOPORT      : Longint     = 401;
//  - Service Object does not support the specified device.
  OPOS_ORS_NOTSUPPORTED: Longint     = 402;
//  - Configuration information error.
  OPOS_ORS_CONFIG      : Longint     = 403;
//  - Errors greater than this value are SO-specific.
  OPOS_ORS_SPECIFIC    : Longint     = 450;


/////////////////////////////////////////////////////////////////////
// OPOS "BinaryConversion" Property Constants (added in 1.2)
/////////////////////////////////////////////////////////////////////

  OPOS_BC_NONE         : Longint     = 0;
  OPOS_BC_NIBBLE       : Longint     = 1;
  OPOS_BC_DECIMAL      : Longint     = 2;


/////////////////////////////////////////////////////////////////////
// "CheckHealth" Method: "Level" Parameter Constants
/////////////////////////////////////////////////////////////////////

  OPOS_CH_INTERNAL     : Longint     = 1;
  OPOS_CH_EXTERNAL     : Longint     = 2;
  OPOS_CH_INTERACTIVE  : Longint     = 3;


/////////////////////////////////////////////////////////////////////
// OPOS "CapPowerReporting", "PowerState", "PowerNotify" Property
//   Constants (added in 1.3)
/////////////////////////////////////////////////////////////////////

  OPOS_PR_NONE         : Longint     = 0;
  OPOS_PR_STANDARD     : Longint     = 1;
  OPOS_PR_ADVANCED     : Longint     = 2;

  OPOS_PN_DISABLED     : Longint     = 0;
  OPOS_PN_ENABLED      : Longint     = 1;

  OPOS_PS_UNKNOWN      : Longint     = 2000;
  OPOS_PS_ONLINE       : Longint     = 2001;
  OPOS_PS_OFF          : Longint     = 2002;
  OPOS_PS_OFFLINE      : Longint     = 2003;
  OPOS_PS_OFF_OFFLINE  : Longint     = 2004;


/////////////////////////////////////////////////////////////////////
// "CompareFirmwareVersion" Method: "Result" Parameter Constants
//   (added in 1.9)
/////////////////////////////////////////////////////////////////////

  OPOS_CFV_FIRMWARE_OLDER      : Longint     = 1;
  OPOS_CFV_FIRMWARE_SAME       : Longint     = 2;
  OPOS_CFV_FIRMWARE_NEWER      : Longint     = 3;
  OPOS_CFV_FIRMWARE_DIFFERENT  : Longint     = 4;
  OPOS_CFV_FIRMWARE_UNKNOWN    : Longint     = 5;


/////////////////////////////////////////////////////////////////////
// "ErrorEvent" Event: "ErrorLocus" Parameter Constants
/////////////////////////////////////////////////////////////////////

  OPOS_EL_OUTPUT       : Longint     = 1;
  OPOS_EL_INPUT        : Longint     = 2;
  OPOS_EL_INPUT_DATA   : Longint     = 3;


/////////////////////////////////////////////////////////////////////
// "ErrorEvent" Event: "ErrorResponse" Constants
/////////////////////////////////////////////////////////////////////

  OPOS_ER_RETRY        : Longint     = 11;
  OPOS_ER_CLEAR        : Longint     = 12;
  OPOS_ER_CONTINUEINPUT: Longint     = 13;


/////////////////////////////////////////////////////////////////////
// "StatusUpdateEvent" Event: Common "Status" Constants
/////////////////////////////////////////////////////////////////////

  OPOS_SUE_POWER_ONLINE                    : Longint     = 2001; // (added in 1.3)
  OPOS_SUE_POWER_OFF                       : Longint     = 2002; // (added in 1.3)
  OPOS_SUE_POWER_OFFLINE                   : Longint     = 2003; // (added in 1.3)
  OPOS_SUE_POWER_OFF_OFFLINE               : Longint     = 2004; // (added in 1.3)

  OPOS_SUE_UF_PROGRESS                     : Longint     = 2100; // (added in 1.9)
  OPOS_SUE_UF_COMPLETE                     : Longint     = 2200; // (added in 1.9)
  OPOS_SUE_UF_COMPLETE_DEV_NOT_RESTORED    : Longint     = 2205; // (added in 1.9)
  OPOS_SUE_UF_FAILED_DEV_OK                : Longint     = 2201; // (added in 1.9)
  OPOS_SUE_UF_FAILED_DEV_UNRECOVERABLE     : Longint     = 2202; // (added in 1.9)
  OPOS_SUE_UF_FAILED_DEV_NEEDS_FIRMWARE    : Longint     = 2203; // (added in 1.9)
  OPOS_SUE_UF_FAILED_DEV_UNKNOWN           : Longint     = 2204; // (added in 1.9)


/////////////////////////////////////////////////////////////////////
// General Constants
/////////////////////////////////////////////////////////////////////

  OPOS_FOREVER         : Longint     = -1; // (added in 1.2)

implementation

end.

